Optimal. Leaf size=61 \[ \frac {2 x \sqrt {\frac {a}{x^2}+b x^{n-2}}}{n}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^{n-2}}}\right )}{n} \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {1979, 2007, 2029, 206} \begin {gather*} \frac {2 x \sqrt {\frac {a}{x^2}+b x^{n-2}}}{n}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^{n-2}}}\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 1979
Rule 2007
Rule 2029
Rubi steps
\begin {align*} \int \sqrt {\frac {a+b x^n}{x^2}} \, dx &=\int \sqrt {\frac {a}{x^2}+b x^{-2+n}} \, dx\\ &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^{-2+n}}}{n}+a \int \frac {1}{x^2 \sqrt {\frac {a}{x^2}+b x^{-2+n}}} \, dx\\ &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^{-2+n}}}{n}-\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {1}{x \sqrt {\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^{-2+n}}}{n}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 70, normalized size = 1.15 \begin {gather*} \frac {x \sqrt {\frac {a+b x^n}{x^2}} \left (2 \sqrt {a+b x^n}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b x^n}}{\sqrt {a}}\right )\right )}{n \sqrt {a+b x^n}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.04, size = 73, normalized size = 1.20 \begin {gather*} \frac {x \sqrt {\frac {a+b x^n}{x^2}} \left (\frac {2 \sqrt {a+b x^n}}{n}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b x^n}}{\sqrt {a}}\right )}{n}\right )}{\sqrt {a+b x^n}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 112, normalized size = 1.84 \begin {gather*} \left [\frac {2 \, x \sqrt {\frac {b x^{n} + a}{x^{2}}} + \sqrt {a} \log \left (\frac {b x^{n} - 2 \, \sqrt {a} x \sqrt {\frac {b x^{n} + a}{x^{2}}} + 2 \, a}{x^{n}}\right )}{n}, \frac {2 \, {\left (x \sqrt {\frac {b x^{n} + a}{x^{2}}} + \sqrt {-a} \arctan \left (\frac {\sqrt {-a} x \sqrt {\frac {b x^{n} + a}{x^{2}}}}{a}\right )\right )}}{n}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {b x^{n} + a}{x^{2}}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.87, size = 74, normalized size = 1.21 \begin {gather*} -\frac {2 \sqrt {\frac {b \,{\mathrm e}^{n \ln \relax (x )}+a}{x^{2}}}\, \sqrt {a}\, x \arctanh \left (\frac {\sqrt {b \,{\mathrm e}^{n \ln \relax (x )}+a}}{\sqrt {a}}\right )}{\sqrt {b \,{\mathrm e}^{n \ln \relax (x )}+a}\, n}+\frac {2 \sqrt {\frac {b \,{\mathrm e}^{n \ln \relax (x )}+a}{x^{2}}}\, x}{n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {b x^{n} + a}{x^{2}}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {\frac {a+b\,x^n}{x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {a + b x^{n}}{x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________